This forum is closed to new posts and
responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:
Hi,
thanks for your inputs and responses.. it was of great help !I finally got it working using the doc.getItems and doc.getAttachment() properties.. I am pasting the code snippet for your reference :
if(doc.hasItem("$FILE"))
{
Vector items = doc.getItems();
for (int j=0; j<items.size(); j++) {
Item item = (Item)items.elementAt(j);
if(item.getName().equals("$FILE")){
System.out.println("document contains an attachment :");
EmbeddedObject eo = doc.getAttachment(item.getValueString());
if(eo!=null){
//check if the object is a file attachment
String type = getObjectType(eo);
log.info("\t\tNon RichTextItem : Type: " + type);
if (type.equals("file attachment")){
eo.extractFile("C:\\extracts\\"+eo.getSource());
}
}
}
}
}
Feedback response number WEBB7PRMHE created by ~Tony Frogeroskiader on 03/02/2009